package com.itany.cloud.controller;

import com.itany.cloud.entity.Emp;
import com.itany.cloud.service.EmpService;
import com.itany.cloud.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/emp")
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping
    public ResponseResult addEmp(Emp emp) {
        empService.addEmp(emp);
        return ResponseResult.success("成功添加员工");
    }

}
